﻿--[[
   @brief    descprtion
   @author   vincentlao
   @version  1.0
   @date     2015-06-11
--]]

group_list_desc = 
{
    module_name = "group_list",
    events = 
    {
        {
            c_event = 
            {
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_GROUP_LIST,
                    callback = "group_list_control.get_grouplist_done"
                },
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_CREATE_GROUP,
                    callback = "group_list_control.on_create_group"
                },        
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_JOIN_GROUP,
                    callback = "group_list_control.on_join_group"
                },
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_QUIT_GROUP,
                    callback = "group_list_control.on_quit_group"
                },
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_DELETE_GROUP,
                    callback = "group_list_control.on_delete_group"
                },
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_RECEIVE_GROUP_REPORT,
                    callback = "group_list_control.on_recv_group_report"
                },
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_ADD_GROUP_ACCEPTED,
                    callback = "group_list_control.on_add_group_accepted"
                },
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_ADD_GROUP_INVITED,
                    callback = "group_list_control.on_add_group_invited"
                },                
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_GROUP_UNREAD_MESSAGE_COUNT,
                    callback = "group_list_control.on_get_group_unreaed_message_count"
                }, 
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_GROUP_INFO,
                    callback = "group_list_control.on_get_group_info"
                },
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_MODIFY_GROUP,
                    callback = "group_list_control.on_modify_group_info"
                },     
                {
                    id = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_MY_SOCIAL_TEST_INFO,
                    callback = "group_list_control.on_get_my_social_test_info"
                },
                {
                    id = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_IM_INITED,
                    callback = "group_list_control.on_im_inited"
                },
            },

            lua_event = 
            {
                {
                    id = group_event.SHOW_GROUP_LIST,
                    callback = "group_list_control.show"
                },
                {
                    id = group_event.GROUP_CLEAR_MESSAGE,
                    callback = "group_list_control.on_group_clear_message"
                },
                {
                    id = group_event.GROUP_NEW_MESSAGE_COME,
                    callback = "group_list_control.on_group_new_message_come"
                },
                {
                    id  = main_event.MAIN_WND_SHOWN,
                    callback = "group_list_control.on_main_wnd_show"
                },
                {
                    id  = mainframe_event.CHANGE_MAINFRAME_MODE,
                    callback = "group_list_control.on_mini_mode_load_finish"
                },
                {
                    id  = social_event.LIVE_ROOM_INVITED_IN_GROUP,
                    callback = "group_list_control.on_live_room_invited_in_group"
                },
            },
            listen_broadcast =
            {
                {
                    id = "i_broadcast_social_mainwnd_show",
                    callback = "group_list_control.on_mainwnd_show"
                },
                {
                    id = 'i_broadcast_social_get_remote_cfg_result',
                    callback = "group_list_control.on_get_remote_cfg"
                },
            },
            reg_service =
            {
                {
                    id = 'i_service_social_get_favor_groupchat_flag',
                    callback = 'group_list_control.get_favor_groupchat_flag'
                },
                {
                    id = 'i_service_social_set_favor_groupchat_flag',
                    callback = 'group_list_control.set_favor_groupchat_flag'
                },
                {
                    id = 'i_service_social_group_get_total_unread_msg_count',
                    callback = 'group_list_control.on_get_total_unread_msg_count'
                },
                {
                    id = 'i_service_social_group_get_recommend_group',
                    callback = 'group_list_control.get_recommend_group'
                },
                {
                    id = 'i_service_get_cached_group_info',
                    callback = 'group_list_control.service_get_group_info'
                },
            },
            
            lua_file = "social\\group_list\\control.lua"
        },
        {
            lua_event = 
            {
                {
                    id = group_event.SHOW_GROUP_SEARCH_MENU,
                    callback = "group_search_menu_listener.show_menu"
                }
            },
            lua_file = "social\\group_list\\group_search_menu.lua"
        }
    }
}

desc_mgr.add(group_list_desc)